package com.molin.IOtest.bytestreamTest.fileinputStreamTest;

import java.io.FileInputStream;
import java.io.IOException;

public class Dmo2 {
    public static void main(String[] args) throws IOException {
        //如果文件不存在，那么直接报错
        String path = "D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\bytestreamTest\\fileinputStreamTest\\a.txt";
        FileInputStream fis = new FileInputStream(path);
        //一次读取多个字节
        int b;
        while ((b = fis.read()) != -1) {
            System.out.println((char) b);
        }
        fis.close();
    }
}
